{% extends "base.html" %}
{% block title %}书籍列表{% endblock %}
{% block content %}
<div id="contentlist">
<table width="600px" cellspacing="0" cellpadding="0" border="1px">
<tr>
<th>书名</th>
<th>作者</th>
<th>类别</th>
<th>出版社</th>
<th>价格</th>
<th>封面</th>
<th>封面故事</th>
<th>日期</th>
<th>操作</th>
</tr>
{% for book in books %}
<tr>
<td>{{ book.name }}</td>
<td>{{ book.author }}</td>
<td>{{ book.category.name }}</td>
<td>{{ book.press.name }}</td>
<td>{{ book.price }}</td>
<td>{% ifequal book.cover None %}暂无图片{% else %}<img style="width:50px;" src="media/{{ book.cover.key }}/{{book.cover.name}}?a=download" alt="{{ book.name }}封面图片" />{% endifequal %}</td>
<td>{{ book.coverStory }}</td>
<td>{{ book.created }}</td>
<td><a href="/phone/delete?id={{ book.key.id }}">删除</a> 修改</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}
